@import '../../scssMixin/generateClassName2.module.scss';
@import '../../scss/vars.module.scss';
$--w: $input-height-base;
$--p: 8px;
@include z('color-box') {
    vertical-align: middle;
    cursor: pointer;
    position: relative;
    display: inline-block;
    background-color: white;
    width: 100%;
    min-width: $--w;
    height: $--w;
    border-radius: 4px;
    border: 1px solid $border-color-base;
    padding: $--p;
	&.allow-clear {
		padding-right: $--p + 25px;
	}
    .z-color-clear-icon {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        right: 12px;
        color: rgba(0, 0, 0, 0.25);
        font-size: 12px;
        cursor: pointer;
        -webkit-transition: color 0.3s;
        transition: color 0.3s;
        vertical-align: 0;
        &:hover {
            color: rgba(0, 0, 0, 0.45);
        }
    }
    @include z('bg') {
        position: relative;
        z-index: 1;
        display: block;
        width: 100%;
        height: $--w - ($--p * 2) - 2;
        background-image: url('');
        background-position: center center;
        background-repeat: repeat;
    }
    @include z('color') {
        border-radius: 2px;
        position: absolute;
        z-index: 2;
        top: $--p;
        left: $--p;
        right: $--p;
        display: block;
        // width: $--w - ($--p * 2) - 2;
        height: $--w - ($--p * 2) - 2;
        background-color: transparent;
        outline: 0;
        &:hover {
            opacity: 0.8;
        }
        &.allow-clear {
            right: $--p + 25px;
        }
    }
    &.disabled {
        cursor: no-drop;
        background-color: #f5f5f5;
    }
    &.large {
        $--w-lg: $input-height-lg;
        $--p-lg: 8px;
        min-width: $--w-lg;
        height: $--w-lg;
        padding: $--p-lg;
        .z-bg {
            height: $--w-lg - ($--p-lg * 2) - 2;
        }
        .z-color {
            top: $--p-lg;
            left: $--p-lg;
            right: $--p-lg;
            height: $--w-lg - ($--p-lg * 2) - 2;
        }
    }
    &.small {
        $--w-sm: $input-height-sm;
        $--p-sm: 4px;
        min-width: $--w-sm;
        height: $--w-sm;
        padding: $--p-sm;
        .z-bg {
            height: $--w-sm - ($--p-sm * 2) - 2;
        }
        .z-color {
            top: $--p-sm;
            left: $--p-sm;
            right: $--p-sm;
            height: $--w-sm - ($--p-sm * 2) - 2;
        }
    }
}
@include z('cover') {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: none;
    visibility: hidden;
}

@include z('picker') {
    outline: none;
    position: absolute;
    box-sizing: content-box;
    div,
    input,
    span {
        box-sizing: content-box;
    }

    .flexbox-fix {
        display: flex;
        flex-wrap: wrap;
    }
}
